Graph extraction